" Maintainer : Nikolai 'pcp' Weibull <da.box@home.se>
" URL : http://www.pcppopper.org/
" Revised on : Wed, 22 Aug 2001 20:48:04 +0200
" TODO : is the deny-all (a la lilo.vim nice or no?)...
" : irritating to be wrong to the last char...
" : would be sweet if right until one char fails
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Set iskeyword since we need `-' (and potentially others) in keywords.
" For version 5.x: Set it globally
" For version 6.x: Set it locally
if version >= 600
command -nargs=1 SetIsk setlocal iskeyword=<args>
else
command -nargs=1 SetIsk set iskeyword=<args>
endif
SetIsk 48-57,65-90,97-122,-,_
delcommand SetIsk
" errors
syn match indentError "\S\+"
" comments
syn region indentComment matchgroup=indentComment start="/\*" end="\*/" contains=indentTodo
" todo
syn keyword indentTodo contained TODO
" keywords (command-line switches)
syn match indentOptions "\<--\(no-\)\=blank-\(before-sizeof\|Bill-Shannon\|lines-\(after-\(commas\|declarations\|procedures\)\|before-block-comments\)\)\>"
syn match indentOptions "\<--brace-indent\s*\d\+\>"
syn match indentOptions "\<--braces-\(after\|on\)-\(if\|struct-decl\)-line\>"
syn match indentOptions "\<--break-\(\(after\|before\)-boolean-operator\|function-decl-args\)\>"
syn match indentOptions "\<--\(case\(-brace\)\=\|comment\|continuation\|declaration\|line-comments\|parameter\|paren\|struct-brace\)-indentation\s*\d\+\>"
syn match indentOptions "\<--\(no-\)\=comment-delimiters-on-blank-lines\>"
syn match indentOptions "\<--\(dont-\)\=cuddle-\(do-while\|else\)\>"
syn match indentOptions "\<--\(declaration-comment\|else-endif\)-column\s*\d\+\>"
syn match indentOptions "\<--dont-break-\(function-decl-args\|procedure-type\)\>"
syn match indentOptions "\<--\(dont-\)\=\(format\(-first-column\)\=\|star\)-comments\>"
syn match indentOptions "\<--\(honour\|ignore\)-newlines\>"
syn match indentOptions "\<--\(indent-level\|\(comment-\)\=line-length\)\s*\d\+\>"
syn match indentOptions "\<--\(leave\|remove\)-preprocessor-space\>"
"not 100%, since casts\= should always be cast if no- isn't given
syn match indentOptions "\<--\(no-\)\=space-after-\(parentheses\|casts\=\|for\|if\|while\)\>"
syn match indentOptions "\<--\(dont-\)\=space-special-semicolon\>"
syn match indentOptions "\<--\(leave\|swallow\)-optional-blank-lines\>"
syn match indentOptions "\<--tab-size\s*\d\+\>"
syn match indentOptions "\<--\(no\|use\)-tabs\>"
syn keyword indentOptions --gnu-style --ignore-profile --k-and-r-style --original
syn keyword indentOptions --preserve-mtime --no-verbosity --verbose --output-file
syn keyword indentOptions --no-parameter-indentation --procnames-start-lines
syn keyword indentOptions --standard-output --start-left-side-of-comments
syn keyword indentOptions --space-after-procedure-calls
" this also here since the gnu indent fellas aren't consistent. (ever read
" the code to `indent'? you'll know what i mean if you have)
syn match indentOptions "\<-\(bli\|cbi\|cd\|ci\|cli\|c\|cp\|di\|d\|i\|ip\|l\|lc\|pi\|sbi\|ts\)\s*\d\+\>"
syn match indentOptions "\<-T\s\+\w\+\>"
syn keyword indentOptions --format-all-comments --continue-at-parentheses --dont-line-up-parentheses
syn keyword indentOptions --no-space-after-function-call-names